package com.tledu.service.impl;

import com.tledu.mapper.LogMapper;
import com.tledu.service.ILogService;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

/**
 * @author cyrus
 */
@Service
@AllArgsConstructor
public class LogServiceImpl implements ILogService {
    private final LogMapper logMapper;

    @Override
    @Transactional(rollbackFor = Exception.class,propagation = Propagation.REQUIRES_NEW)
    public void addLog(String info) {
        logMapper.addLog(info);
    }
}
